import request from "@/utils/request";
// 请求商品分类列表
const fetchCateLists = (params = {}) => (
  request.get('/cateLists', {params})
)
// 新增商品分类
const addCate =  (params = {}) => request.post('/addCate', params)
// 获取商品详情
const getCateDetail = (id) => {
  return request.get('/getCateDetail', { params: {id} })
}
// 修改商品分类
const updateCate =  (params = {}) => request.put('/updateCate', params)
// 删除商品分类
const delCate = (id) => (
  request.delete('/delCate', {params: {id}})
)
export {
  fetchCateLists,
  addCate,
  getCateDetail,
  updateCate,
  delCate
}